package com.logistics.role.entity.model;

import com.logistics.utils.tool.StringUtils;
import lombok.Data;

@Data
public class RoleMenuSave {

    private Integer roleId;
    private Integer menuId;

    public RoleMenuSave(){

    }

    public RoleMenuSave(String roleId, String menuId){
        this.roleId = StringUtils.isNotNull(roleId) ? Integer.parseInt(roleId) : null;
        this.menuId = StringUtils.isNotNull(menuId) ? Integer.parseInt(menuId) : null;
    }

    public static  RoleMenuSave build(String roleId, String menuId){
        return new RoleMenuSave(roleId, menuId);
    }
}
